DigiLocker Pull Parameters API
The following document highlights the details of the DigiLocker Pull Parameters API.
API Description
Objective
The DigiLocker Pull Parameters API retrieves the required parameters for fetching documents from DigiLocker.
These parameters serve as inputs for the DigiLocker - Fetch Document API.
| Input | Output |
|---|---|
| An array of document codes (combining organization IDs and document types) for which to pull parameters. These codes are retrieved from the DigiLocker - Fetch Document Type Map API | The parameters required to fetch documents from DigiLocker |
API URL
https://ind-verify.hyperverge.co/api/digilocker/pullParameters
API Endpoint
pullParameters
Overview
The DigiLocker Pull Parameters API is RESTful and uses standard HTTP verbs and status codes. The responses are in JSON format and you should upload all images and files as form-data through a POST request.
Method - POST
Authentication
You need a unique pair of application ID ( appId ) and application key ( appKey ) from HyperVerge to verify your identity for accessing the API.
Headers
| Header | Mandatory / Optional | Description | Input Format |
|---|---|---|---|
| content-type | Mandatory | This parameter defines the media type for the request payload | application/json |
| appId | Mandatory | The application identifier shared by HyperVerge. You can find the details in the dashboard's credentials tab | This should be a unique value |
| appKey | Mandatory | The application key shared by HyperVerge. You can find the details in the dashboard's credentials tab | This should be a unique value |
| transactionId | Optional | A unique identifier for tracking a user journey | This should be both unique and easily associated with the user's journey in your application(s) |
Inputs
The following table provides the details of the parameters required for the DigiLocker Pull Parameters API 's request body:
| Parameter | Mandatory / Optional | Type | Description | Input Format | Default Value |
|---|---|---|---|---|---|
documentCodes | Mandatory | array | An array of document codes, each combining an organization ID and document type, retrieved from the DigiLocker Fetch Supported Documents and Issuers API response | orgID_docType. For example, "002204_DRVLC", "001891_PANCR" | Not Applicable |
Request
The following code snippet demonstrates a standard curl request for the DigiLocker Pull Parameters API:
curl --location --request POST 'https://ind-verify.hyperverge.co/api/digilocker/pullParameters' \
--header 'Content-Type: application/json' \
--header 'appId: <Enter_the_HyperVerge_appId>' \
--header 'appKey: <Enter_the_HyperVerge_appKey>' \
--header 'transactionId: <Enter_the_transactionId>' \
--data-raw '["002204_DRVLC", "001891_PANCR"]'
Success Response
The following code snippet demonstrates a success response from the DigiLocker Pull Parameters API:
{
"status": "success",
"statusCode": "200",
"result": [
{
"docId": "001891_PANCR",
"params": [
[
{
"label": "PAN No.",
"paramname": "panno",
"example": "ABCD123EF"
},
{
"label": "Name as in PAN Card",
"paramname": "PANFullName",
"example": "RAMESHWAR KUMAR SINGH"
}
]
]
},
{
"docId": "002204_DRVLC",
"params": [
[
{
"label": "DL No",
"paramname": "dlno",
"example": "Ex. JH02/2009/236543"
}
]
]
}
]
}
Success Response Details
The following table outlines the details of the success response from the DigiLocker Pull Parameters API:
| Parameter | Type | Description |
|---|---|---|
status | string | The status of the request |
statusCode | string | The HTTP status code for the response |
result | array | An array of objects, each containing document parameters |
result[].docId | string | The document ID for which parameters are returned |
result[].params | array | An array containing parameter groups. Each group is an array of parameter objects |
result[].params[][].label | string | The display label for the parameter |
result[].params[][].paramname | string | The parameter name to be used when fetching the document |
result[].params[][].example | string | An example value for the parameter |
Error Responses
The following are some error responses from the DigiLocker Pull Parameters API:
- Invalid Organisation ID
- Invalid Document Type
{
"status": "success",
"statusCode": "200",
"result": [
{
"docId": "001891A_PANCR", // the entered docId
"error": {
"error": "invalid_parameter",
"message": "orgid parameter is missing or invalid"
}
}
]
}
{
"status": "success",
"statusCode": "200",
"result": [
{
"docId": "001891_PANCRAS", // the entered docId
"error": {
"error": "invalid_parameter",
"message": "The doctype field can not exceed 6 characters in length."
}
}
]
}
Error Response Details
A failure or error response contains an error object within the result array for the specific document ID that failed.
The following table lists all error responses:
| Status Code | Error Message | Error Description | Error Resolution |
|---|---|---|---|
| 200 | invalid_parameter | The document code (ordID / docType) provided is either missing or invalid | Verify that the document codes match valid document IDs from the DigiLocker - Fetch Document Type Map API |
| 401 | Missing/Invalid credentials | The request is either missing the mandatory appId and appKey combination or has invalid values | Provide valid appId and appKey credentials in the request |
| 500 | Internal Server Error | There was an error with HyperVerge's server | Please check the request headers or contact the HyperVerge team for resolution |